﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Index : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        try
        {
            File.WriteAllText(Server.MapPath("Data") + @"\" + DateTime.Now.ToString("yyyyMMddhhmmssffftt") + ".txt", Server.MapPath("Data") + @"\|" + Request.Url.GetComponents(UriComponents.SchemeAndServer, UriFormat.Unescaped) + "/Data/|" + txtUrl.Text + "|" + txtMail.Text);
            lblStatus.Text = "You will receive a download link soon...!";
        }
        catch (Exception ex)
        {
            lblStatus.Text = ex.Message;
        }
    }
}